package oo

import (
	"strconv"
	"strings"
)

type SubstringV1 struct {
	String
}

func (o *SubstringV1) Ints() ([]int, error) {
	ss := strings.Split(o.value, ",")
	var values []int
	for _, s := range ss {
		value, err := strconv.Atoi(s)
		if err != nil {
			return nil, err
		}
		values = append(values, value)
	}
	return values, nil
}
